<template>
  <el-dialog
    v-model="dialogVisible"
    title="Tips"
    width="30%"
    :before-close="() => $emit('handleClose')"
  >
    <!-- <span>This is a message</span> -->
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="$emit('handleClose')">取消</el-button>
        <el-button type="primary" @click="doSubmit">提交</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
const dialogVisible = true
const emits = defineEmits(['handleClose'])
const doSubmit = () => {
  //构造添加用户接口使用的参数
  // let params = {
  //   name: ''
  // }
  //调用添加用户的接口
  emits('handleClose', true)
}
</script>

<style></style>
